import createAxios from '/@/utils/axios'

const controllerUrl = '/admin/xmwms.Product/'

export const actionUrl = new Map([
    ['warning', controllerUrl + 'warning'],
    ['stockInquiry', controllerUrl + 'stockInquiry'],
])

export function productWarning(filter: anyObj = {}): ApiPromise<TableDefaultData> {
    return createAxios({
        url: actionUrl.get('warning'),
        method: 'get',
        params: filter,
    }) as ApiPromise
}

export function stockInquiry(filter: anyObj = {}): ApiPromise<TableDefaultData> {
    return createAxios({
        url: actionUrl.get('stockInquiry'),
        method: 'get',
        params: filter,
    }) as ApiPromise
}
